The present invention relates to data center management and file systems, and more specifically, this invention relates to locking at the record level of a file structure to ensure data integrity when performing operations to local data set records.
File systems which allow direct and sequential accesses to data stored therein typically utilize a B+ tree structure which is a variation of the basic B tree structure with all terminal nodes thereof containing data records. The non-terminal nodes of the B+ tree structure are referred to as an index structure. The top of the B+ tree structure is a single node referred to as the root. The B+ tree structure is a balanced tree with all the terminal nodes at the same level such that all data records stored therein have the same or substantially the same search length. The effectiveness and the popularity of the B+ tree structure may be attributable to the shape of the tree. The B+ tree tends to be short and wide, referred to typically as “flat,” e.g., it has few hierarchical levels and many nodes at each level.
The B+ tree structure has become somewhat of a standard for organization of files. Many database systems (relational or otherwise) and general-purpose access methods, such as virtual storage access method (VSAM), are designed using the B+ tree structure. The VSAM includes some additional features over other typical access methods, such as key compression. For ease of discussion, and due to the fact that VSAM was one of the first commercial products in the world that used the B+ tree structure, VSAM terminology may be used in the descriptions provided, but the descriptions are not limited to VSAM alone, as any access method may be used in relation to a B+ tree structure.
Virtual storage access method (VSAM) is a disk file storage access method used in IBM z/OS environments. VSAM data sets include multiple records, and the data sets are of fixed or variable length, and are organized into fixed-size blocks called Control Intervals (CIs). The CIs are then organized into larger groups referred to as Control Areas (CAs). CIs are used as units of transfer between direct access storage devices (DASDs) and requesting systems such that a read request will read one complete CI. CAs are used as units of allocation, such that when a VSAM data set is defined, an integral number of CAs will be allocated for that VSAM data set.
When multiple users of a VSAM file system attempt to access data sets on the same z/OS system, read/write integrity may be lost due to the multiple users possibly making different changes, deletions, and/or additions to one or more data sets on the z/OS system, which may cause the z/OS system to lose data integrity. Accordingly, generally, z/OS systems typically do not allow multiple users to access the same data sets simultaneously by using a lock mechanism which allows only one user to access a data set at a time. This lock can result in latency to the system when multiple users are attempting to access one or more of the same data sets.
Some attempted solutions have been proposed to alleviate this problem. One such attempt, as presented in U.S. Patent Appl. Pub. No. 2010/0299384, allows multiple users to access a VSAM data set by sending any read/write requests directed toward that data set to a single user which has directly opened the data set. Then, these read/write requests have to be serialized on the user's system, and processed accordingly, since the data set is locked for use by the user's system and unavailable to other users. One drawback to this solution is that if the user's system fails, which is accessing the data set directly, all access to the data set is lost for all users. This is because this solution establishes a single point of failure (SPOF), which is capable of adversely impacting availability when the single user's system fails or is otherwise lost. Another drawback to this solution is that there is performance overhead associated with sending the read/write requests to the single user, which results in latency in the z/OS system.
According to another attempt to address the problem, as presented in U.S. Pat. No. 5,355,477, U.S. Pat. No. 4,399,504, and U.S. Patent Appl. Pub. No. 2004/0220934, multiple users are allowed to directly access the VSAM data set from the same z/OS system with full read/write integrity while executing in “sysplex” mode. Some of the drawbacks to this solution include the financial cost of purchasing sysplex hardware, e.g., a Coupling Facility (CF), and that performance overhead is associated with interfacing with the sysplex hardware, which results in latency in the z/OS system.